/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.taobao.ibatiside.model.configv2.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import org.taobao.ibatiside.model.configv2.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class Configv2FactoryImpl extends EFactoryImpl implements Configv2Factory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Configv2Factory init() {
		try {
			Configv2Factory theConfigv2Factory = (Configv2Factory)EPackage.Registry.INSTANCE.getEFactory("platform:/resource/org.taobao.ibatiside.model/model/config2.xsd"); 
			if (theConfigv2Factory != null) {
				return theConfigv2Factory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new Configv2FactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Configv2FactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case Configv2Package.DATA_SOURCE_TYPE: return createDataSourceType();
			case Configv2Package.DOCUMENT_ROOT: return createDocumentRoot();
			case Configv2Package.PROPERTIES_TYPE: return createPropertiesType();
			case Configv2Package.PROPERTY_TYPE: return createPropertyType();
			case Configv2Package.RESULT_OBJECT_FACTORY_TYPE: return createResultObjectFactoryType();
			case Configv2Package.SETTINGS_TYPE: return createSettingsType();
			case Configv2Package.SQL_MAP_CONFIG_TYPE: return createSqlMapConfigType();
			case Configv2Package.SQL_MAP_TYPE: return createSqlMapType();
			case Configv2Package.TRANSACTION_MANAGER_TYPE: return createTransactionManagerType();
			case Configv2Package.TYPE_ALIAS_TYPE: return createTypeAliasType();
			case Configv2Package.TYPE_HANDLER_TYPE: return createTypeHandlerType();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DataSourceType createDataSourceType() {
		DataSourceTypeImpl dataSourceType = new DataSourceTypeImpl();
		return dataSourceType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DocumentRoot createDocumentRoot() {
		DocumentRootImpl documentRoot = new DocumentRootImpl();
		return documentRoot;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PropertiesType createPropertiesType() {
		PropertiesTypeImpl propertiesType = new PropertiesTypeImpl();
		return propertiesType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PropertyType createPropertyType() {
		PropertyTypeImpl propertyType = new PropertyTypeImpl();
		return propertyType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ResultObjectFactoryType createResultObjectFactoryType() {
		ResultObjectFactoryTypeImpl resultObjectFactoryType = new ResultObjectFactoryTypeImpl();
		return resultObjectFactoryType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SettingsType createSettingsType() {
		SettingsTypeImpl settingsType = new SettingsTypeImpl();
		return settingsType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SqlMapConfigType createSqlMapConfigType() {
		SqlMapConfigTypeImpl sqlMapConfigType = new SqlMapConfigTypeImpl();
		return sqlMapConfigType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public SqlMapType createSqlMapType() {
		SqlMapTypeImpl sqlMapType = new SqlMapTypeImpl();
		return sqlMapType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TransactionManagerType createTransactionManagerType() {
		TransactionManagerTypeImpl transactionManagerType = new TransactionManagerTypeImpl();
		return transactionManagerType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TypeAliasType createTypeAliasType() {
		TypeAliasTypeImpl typeAliasType = new TypeAliasTypeImpl();
		return typeAliasType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TypeHandlerType createTypeHandlerType() {
		TypeHandlerTypeImpl typeHandlerType = new TypeHandlerTypeImpl();
		return typeHandlerType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Configv2Package getConfigv2Package() {
		return (Configv2Package)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static Configv2Package getPackage() {
		return Configv2Package.eINSTANCE;
	}

} //Configv2FactoryImpl
